<%@page import="com.model.StudentInfo"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>学生信息管理系统</title>
<style>tr{height:50px;}
.input{
	font-size: 14px;
	width:50%;
	height:25px;
	border-radius:5px;
	box-shadow:0;
}
.td{
	width:150px;
}
td{
	padding-left:40px;
}</style>
<script type="text/javascript" src="js/Calendar3.js"></script>
</head>
<jsp:include page="islogin.jsp"></jsp:include>
<jsp:useBean id="studentInfoServer" class="com.jdbc.DAO.StudentInfoServer"></jsp:useBean>
<body>
	<%  int id = Integer.parseInt(request.getParameter("id"));
		StudentInfo stu = studentInfoServer.queryStudentById(id);
	%>
	<center>
		<form action="modifyOneStudent_result.jsp" method="post">
			<table bgcolor="#fff" width="90%" cellspacing="0" style="font-size:14px;">
				<tr>
					<td align="center" bgcolor="#f4f4f4" colspan="2">修改学生信息</td>
				</tr>
				<tr>
					<td class="td">姓名：</td>
					<td><input type="text" name="name" class="input" value="<%=stu.getName() %>"/></td>
				</tr>
				<tr>
					<td class="td">班级：</td>
					<td><input type="text" name="ofClass" class="input" value="<%=stu.getOfClass() %>"/></td>
				</tr>
				<tr>
					<td class="td">性别：</td>
					<td><input type="radio" name="sex" value="1" <%if(stu.getSex()==1){ %> checked <%} %>/>男&nbsp;&nbsp;&nbsp;
						<input type="radio" name="sex" value="0" <%if(stu.getSex()==0){ %> checked <%} %>/>女</td>
				</tr>
				<tr>
			    	<td class="td">出生日期：</td>
			    	<td><input name="birthday" type="text" class="input" maxlength="10" onclick="new Calendar().show(this);" readonly="readonly" value="<%=stu.getBirthday() %>" />
			    	</td>
			    </tr>
			    <tr>
					<td class="td">所学专业：</td>
					<td><select name="major" class="input" >
							<option <%if(stu.getMajor().contains("计算机科学与技术")){ %> selected="selected" <%} %>>计算机科学与技术</option>
							<option <%if(stu.getMajor().contains("通信工程")){ %> selected="selected" <%} %>>通信工程</option>
							<option <%if(stu.getMajor().contains("电气工程")){ %> selected="selected" <%} %>>电气工程</option>
						</select></td>
				</tr>
			    <tr>
					<td class="td">主修课：</td>
					<td><select name="courseArray" size="3" multiple="multiple" class="input" style="height:60px;">
							<option <%if(stu.getCourse().contains("计算机导论")){ %> selected="selected" <%} %>>计算机导论</option>
							<option <%if(stu.getCourse().contains("数据结构")){ %> selected="selected" <%} %>>数据结构</option>
							<option <%if(stu.getCourse().contains("计算机原理")){ %> selected="selected" <%} %>>计算机原理</option>
							<option <%if(stu.getCourse().contains("操作系统")){ %> selected="selected" <%} %>>操作系统</option>
							<option <%if(stu.getCourse().contains("计算机网络")){ %> selected="selected" <%} %>>计算机网络</option>
							<option <%if(stu.getCourse().contains("大学物理")){ %> selected="selected" <%} %>>大学物理</option>
						</select></td>
				</tr>
				<tr>
					<td>兴趣：</td>
					<td><input type="checkbox" value="music" name="hobbyArray" <%if(stu.getHobby().contains("music")){ %> checked <%} %> />听音乐&nbsp;&nbsp;
						<input type="checkbox" value="book" name="hobbyArray" <%if(stu.getHobby().contains("book")){ %> checked <%} %> />看书&nbsp;&nbsp;
						<input type="checkbox" value="web" name="hobbyArray" <%if(stu.getHobby().contains("web")){ %> checked <%} %> />上网&nbsp;&nbsp;</td>
				</tr>
				<tr>
					<td>备注：</td>
					<td><textarea rows="6"  cols="50" name="beizhu" class="input" style="height:70px;"><%=stu.getBeizhu() %></textarea></td>
				</tr>
				<tr>
					<td align="center" colspan="2">
						<input type="hidden" name="id" value="<%=stu.getId() %>" />
						<input type="submit" value="提交" style="height:30px;width:50px;border-radius:5px;background-color: #eee"/>&nbsp;&nbsp;
						<input type="reset" value="重置" style="height:30px;width:50px;border-radius:5px;background-color: #eee"/></td>
				</tr>
				</table>
		</form>
	</center>
</body>
<style>

</style>
</html>